<html>
<head>
	</head>
	<meta http-equiv="content-Type" content = text/html; charset = utf-8"/>
<tittle>Dien tich hinh chu nhat</tittle>
<style type = "text/css">
<!--
.style1{
	font-family = LucidaHandwriting;
	font-size : 20px;
	font-weight: bold ;
}
.style4{
	font-family :Verdana, Arial, Helvetica, sans-serif;font-size:12px;
	}
-->
</style>	
<body>
<?php
	if(isset($_POST["dai"]) && isset($_POST["rong"]))
	{
		$dai = $_POST["dai"];
		$rong = $_POST["rong"];
		$dt = $dai * $rong;
	}
?>


<form id = "form1" name = "form1" method = "post" action = "studyingPHP.php">
	<table width = "400" border = "0" align = "center" cellpadding = "2" cellspacing = "2">
		<tr>
			<td colspan = "2" align = "center"><span class = "style1">DIEN TICH HINH CHU NHAT</ span></td>
		</tr>
		
		<tr>
			<td 
				width = "125"><span class = "style4">chieu dai:</span>
			</td>
			
			<td 
				width = "261">
				<label>
					<input name = "dai" type = "text" id = "dai" 
					value = "
						<?php
								if(isset($_POST["dai"]))
								{
									echo $_POST["dai"];
								}
						?>" size = "20"/>
				</label>
			</td>
		</tr>
		
		<tr>
			<td>
				<span class = "style4">chieu rong:</span>
			</td>
			
			<td>
				<label>
					<input name = "rong" type = "text" id = "rong" value = "<?php if(isset($_POST["rong"])){echo $_POST["rong"];}?>" size ="20"/>
				</label>
			</td>
		</tr>
		
		<tr>
			<td>
				<span class = "style4">dien tich:</span>
			</td>
			
			<td>
				<label>
					<input name = "dt" type = "text" id = "dt" value = "<?php echo $dt;?>" size = "20" readonly = "true" style = "background-color:#FFCCCCC"/>
				</label>
			</td>	
		</tr>
		
		<tr>
			<td colspan="2" align = "center"><label>
			<input type = "submit" name = "submit" value = "tinh"/>
		</label>
		</tr>
		
		<tr>	
			<td 
				colspan = "2">&nbsp;
			</td>
		</tr>
	</table>
</form>







</body>
</html>